import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

///
///
/// 
///
class AppBarNormal extends PreferredSize {
  String title;

  @override
  // TODO: implement preferredSize
  Size get preferredSize => Size.fromHeight(45);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return AppBar(
      leading: GestureDetector(
        onTap: () {
          print("返回");
          Navigator.pop(context);
        },
        child: Container(
          color: Colors.white,
          width: 45,
          height: 45,
          child: Center(
            child: Image.asset(
              'images/img_back.png',
              fit: BoxFit.fitHeight,
              width: 10,
              height: 18,
            ),
          ),
        ),
      ),
      elevation: 0,
      centerTitle: true,
      title: Text(
        title,
        style: TextStyle(color: Colors.black, fontSize: 17),
      ),
      backgroundColor: Colors.white,
    );
  }

  AppBarNormal(this.title);
}
